package builder;

public class BuilderC implements IBuilder {

    ProductA productA;

    public BuilderC() {
        this.productA = new ProductA();
    }

    @Override
    public BuilderC buildPartA(String name) {
        productA.setName(name);
        return this;
    }

    @Override
    public BuilderC buildPartB(int weight) {
        productA.setWeight(weight);
        return this;
    }

    @Override
    public BuilderC buildPartC(int time) {
        productA.setTime(time);
        return this;
    }

    @Override
    public Product getResult() {
        return productA;
    }
}
